package Demo8;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext c=new AnnotationConfigApplicationContext("Demo8");
        Person p=c.getBean(Person.class);
        System.out.println("spring 返回person,可以使用该对象");
        c.close();
    }
}
